package com.kinon.ogt.utils;

/**
 * 佛祖保佑 永无BUG
 *
 * @author WangZhiYao
 * @date 2018/4/24
 */
public class RegExUtils {

    private static final String REGEX_PHONE_NUMBER = "^(\\+?0?86-?)?1[3456789]\\d{9}$";

    public static boolean isPhoneNumValid(String phoneNum) {
        return null != phoneNum && !phoneNum.isEmpty() && phoneNum.matches(REGEX_PHONE_NUMBER);
    }

    public static boolean isPasswordValid(String password) {
        return null != password && !password.isEmpty() && password.length() <= 16;
    }
}
